package com.lanren.androidanimations.library.easing;

import com.lanren.androidanimations.library.easing.back.BackEaseIn;
import com.lanren.androidanimations.library.easing.back.BackEaseInOut;
import com.lanren.androidanimations.library.easing.back.BackEaseOut;
import com.lanren.androidanimations.library.easing.bounce.BounceEaseIn;
import com.lanren.androidanimations.library.easing.bounce.BounceEaseInOut;
import com.lanren.androidanimations.library.easing.bounce.BounceEaseOut;
import com.lanren.androidanimations.library.easing.circ.CircEaseIn;
import com.lanren.androidanimations.library.easing.circ.CircEaseInOut;
import com.lanren.androidanimations.library.easing.circ.CircEaseOut;
import com.lanren.androidanimations.library.easing.cubic.CubicEaseIn;
import com.lanren.androidanimations.library.easing.cubic.CubicEaseInOut;
import com.lanren.androidanimations.library.easing.cubic.CubicEaseOut;
import com.lanren.androidanimations.library.easing.elastic.ElasticEaseIn;
import com.lanren.androidanimations.library.easing.elastic.ElasticEaseOut;
import com.lanren.androidanimations.library.easing.expo.ExpoEaseIn;
import com.lanren.androidanimations.library.easing.expo.ExpoEaseInOut;
import com.lanren.androidanimations.library.easing.expo.ExpoEaseOut;
import com.lanren.androidanimations.library.easing.linear.Linear;
import com.lanren.androidanimations.library.easing.quad.QuadEaseIn;
import com.lanren.androidanimations.library.easing.quad.QuadEaseInOut;
import com.lanren.androidanimations.library.easing.quad.QuadEaseOut;
import com.lanren.androidanimations.library.easing.quint.QuintEaseIn;
import com.lanren.androidanimations.library.easing.quint.QuintEaseInOut;
import com.lanren.androidanimations.library.easing.quint.QuintEaseOut;
import com.lanren.androidanimations.library.easing.sine.SineEaseIn;
import com.lanren.androidanimations.library.easing.sine.SineEaseInOut;
import com.lanren.androidanimations.library.easing.sine.SineEaseOut;

/**
 * @ClassName SkillHelper
 * @Description TODO
 * @Author chongheng.wang
 * @Date 2020/3/10 18:01
 * @Version 1.0
 */
public class SkillHelper {
    public static final int BackEaseIn = 0;//向后缓入
    public static final int BackEaseOut = 1;//向后缓出
    public static final int BackEaseInOut = 2;//向后缓入缓出

    public static final int BounceEaseIn = 3;//弹跳缓解入
    public static final int BounceEaseOut = 4;//弹跳缓解出
    public static final int BounceEaseInOut = 5;//弹跳轻松进出

    public static final int CircEaseIn = 6;//
    public static final int CircEaseOut = 7;//
    public static final int CircEaseInOut = 8;//

    public static final int CubicEaseIn = 9;//
    public static final int CubicEaseOut = 10;//
    public static final int CubicEaseInOut = 11;//

    public static final int ElasticEaseIn = 12;//
    public static final int ElasticEaseOut = 13;//

    public static final int ExpoEaseIn = 14;//
    public static final int ExpoEaseOut = 15;//
    public static final int ExpoEaseInOut = 16;//

    public static final int QuadEaseIn = 17;//
    public static final int QuadEaseOut = 18;//
    public static final int QuadEaseInOut = 19;//

    public static final int QuintEaseIn = 20;//
    public static final int QuintEaseOut = 21;//
    public static final int QuintEaseInOut = 22;//

    public static final int SineEaseIn = 23;//
    public static final int SineEaseOut = 24;//
    public static final int SineEaseInOut = 25;//

    public static final int Linear = 26;//

    public static BaseEasingMethod getMethod(int method, float duration) {
        BaseEasingMethod easingMethod = null;
        switch (method) {
            case BackEaseIn:
                easingMethod = new BackEaseIn(duration);
                break;
            case BackEaseOut:
                easingMethod = new BackEaseOut(duration);
                break;
            case BackEaseInOut:
                easingMethod = new BackEaseInOut(duration);
                break;
            case BounceEaseIn:
                easingMethod = new BounceEaseIn(duration);
                break;
            case BounceEaseOut:
                easingMethod = new BounceEaseOut(duration);
                break;
            case BounceEaseInOut:
                easingMethod = new BounceEaseInOut(duration);
                break;
            case CircEaseIn:
                easingMethod = new CircEaseIn(duration);
                break;
            case CircEaseOut:
                easingMethod = new CircEaseOut(duration);
                break;
            case CircEaseInOut:
                easingMethod = new CircEaseInOut(duration);
                break;
            case CubicEaseIn:
                easingMethod = new CubicEaseIn(duration);
                break;
            case CubicEaseOut:
                easingMethod = new CubicEaseOut(duration);
                break;
            case CubicEaseInOut:
                easingMethod = new CubicEaseInOut(duration);
                break;
            case ElasticEaseIn:
                easingMethod = new ElasticEaseIn(duration);
                break;
            case ElasticEaseOut:
                easingMethod = new ElasticEaseOut(duration);
                break;
            case ExpoEaseIn:
                easingMethod = new ExpoEaseIn(duration);
                break;
            case ExpoEaseOut:
                easingMethod = new ExpoEaseOut(duration);
                break;
            case ExpoEaseInOut:
                easingMethod = new ExpoEaseInOut(duration);
                break;
            case QuadEaseIn:
                easingMethod = new QuadEaseIn(duration);
                break;
            case QuadEaseOut:
                easingMethod = new QuadEaseOut(duration);
                break;
            case QuadEaseInOut:
                easingMethod = new QuadEaseInOut(duration);
                break;
            case QuintEaseIn:
                easingMethod = new QuintEaseIn(duration);
                break;
            case QuintEaseOut:
                easingMethod = new QuintEaseOut(duration);
                break;
            case QuintEaseInOut:
                easingMethod = new QuintEaseInOut(duration);
                break;
            case SineEaseIn:
                easingMethod = new SineEaseIn(duration);
                break;
            case SineEaseOut:
                easingMethod = new SineEaseOut(duration);
                break;
            case SineEaseInOut:
                easingMethod = new SineEaseInOut(duration);
                break;
            case Linear:
                easingMethod = new Linear(duration);
                break;
        }
        return easingMethod;
    }

}
